package com.fll.codeworld.enumtest;

/**
 * enum测试类,用于测试枚举类
 * @author fff
 */
public class TestEnum2 {
    public static void main(String[] args) {
        System.out.println(BorrowStatusEnum.toList());
        System.out.println("根据code获取枚举对象:" + BorrowStatusEnum.findEnumByCode("IN_USE"));
        System.out.println("根据name获取枚举对象:" + BorrowStatusEnum.findEnumByName("已还款"));
        System.out.println("根据code获取name:" + BorrowStatusEnum.findEnumByCode("IN_USE").getName());
        System.out.println("根据name获取code:" + BorrowStatusEnum.findEnumByName("已还款").getCode());
        System.out.println();
    }
}
